<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
    <script src="https://cdn.staticfile.org/element-ui/2.15.13/index.min.js"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.13/theme-chalk/index.min.css" />
    <script src="https://unpkg.com/xlsx-populate@1.21.0/browser/xlsx-populate.min.js"></script>
    <title>231-element-ui表格dom带样式导出</title>
    <script type="module" crossorigin src="../../../../static/js/231-index.html-19aba4e2.js"></script>
    <link rel="modulepreload" crossorigin href="../../../../static/common/modulepreload-polyfill-3cfb730f.js">
    <link rel="modulepreload" crossorigin href="../../../../static/common/excelExportStyle-79dfab3e.js">
  </head>
  <body>
    <div id="app">
      <div>
        <p>
          文章参考：
          <a href="https://zhuanlan.zhihu.com/p/345915999" target="_blank">前端生成并导出带样式的excel</a>
        </p>
        <el-button @click="exportHandle">导出</el-button>
        <el-table id="waterTable" :data="tableData" style="width: 100%">
          <el-table-column prop="date" label="日期" width="150"> </el-table-column>
          <el-table-column label="配送信息">
            <el-table-column prop="name" label="姓名" width="120"> </el-table-column>
            <el-table-column label="地址">
              <el-table-column prop="province" label="省份" width="120"> </el-table-column>
              <el-table-column prop="city" label="市区" width="120"> </el-table-column>
              <el-table-column prop="address" label="地址" width="300"> </el-table-column>
              <el-table-column prop="zip" label="邮编" width="120"> </el-table-column>
            </el-table-column>
          </el-table-column>
        </el-table>
      </div>
    </div>
    
  </body>
</html>
